package com.cskaoyan.mapper;

import com.cskaoyan.bean.CskaoyanmallRegion;
import com.cskaoyan.bean.CskaoyanmallRegionExample;
import java.util.List;

import com.cskaoyan.bean.vo.City;
import com.cskaoyan.bean.vo.ProvinceVo;
import com.cskaoyan.bean.vo.Region;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface CskaoyanmallRegionMapper {
    long countByExample(CskaoyanmallRegionExample example);

    int deleteByExample(CskaoyanmallRegionExample example);

    /**
     * delete by primary key
     * @param id primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(Integer id);

    /**
     * insert record to table
     * @param record the record
     * @return insert count
     */
    int insert(CskaoyanmallRegion record);

    /**
     * insert record to table selective
     * @param record the record
     * @return insert count
     */
    int insertSelective(CskaoyanmallRegion record);

    List<CskaoyanmallRegion> selectByExample(CskaoyanmallRegionExample example);

    /**
     * select by primary key
     * @param id primary key
     * @return object by primary key
     */
    CskaoyanmallRegion selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") CskaoyanmallRegion record, @Param("example") CskaoyanmallRegionExample example);

    int updateByExample(@Param("record") CskaoyanmallRegion record, @Param("example") CskaoyanmallRegionExample example);

    /**
     * update record selective
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(CskaoyanmallRegion record);

    /**
     * update record
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(CskaoyanmallRegion record);

    List<ProvinceVo> selectProvincesByType();
    List<City> selectCityById(@Param("pid") Integer pid);
    List<Region> selectRegionById(@Param("cid") Integer cid);

    List<CskaoyanmallRegion> selectRegionByPid(Integer pid);

    Integer selectTotal();

    String selectProvinceById(Integer ProvinceId);

    String selectCityByCityId(Integer cityId);

    String selectAreaById(Integer areaId);
}